<?php

class Student_Model_DbTable_StudentLession extends Zend_Db_Table_Abstract
{

    protected $_name = 'student_lession';
    public function getAll(){
    	 return $this->fetchAll();
    }
    
    public function getByID($id){
    	 return $this->fetchRow("student_lession_id = $id");
    }
    
    public function addNew($lesList,$teacherID){
    	 $data = array(
    	 		'lession_list'=>$lesList,
    	 		"teacher_id"=>$teacherID
    	 		);
    	 return $this->insert($data);
    }
    
    public function updateStdlession($id,$lesList,$teacherID){
    	$data = array(
    			'lession_list'=>$lesList,
    			"teacher_id"=>$teacherID
    	);
    	return $this->update($data, "student_lession_id = $id");
    }

}

